package com.kcwl.carrier.infrastructure.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kcwl.carrier.domain.entity.BaseInfo;
import com.kcwl.carrier.domain.entity.VehicleInfoListVo;
import com.kcwl.carrier.domain.entity.VehicleInfoVo;
import com.kcwl.carrier.infrastructure.repository.po.VehicleInfoPO;
import com.kcwl.carrier.interfaces.dto.OrderVehicleDTO;
import com.kcwl.carrier.interfaces.query.OrderVehicleQuery;
import com.kcwl.carrier.interfaces.query.UserIdQuery;
import com.kcwl.carrier.interfaces.query.VehicleQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @描述
 * @创建人 zhl
 * @创建时间 2022/10/31
 * @修改人和其它信息
 */
public interface VehicleInfoMapper extends BaseMapper<VehicleInfoPO> {
    Integer updateVehicleCategory(VehicleInfoPO vehicleInfo);

    Integer countTrailerBindNum(Map<String, Object> params);

    Integer getVehicleCount(@Param("query") VehicleQuery query);

    IPage<VehicleInfoVo> getVehiclePage(Page<VehicleInfoVo> page, @Param("query") VehicleQuery query);

    IPage<VehicleInfoListVo> queryVehiclePage(Page<VehicleInfoVo> page, @Param("query") VehicleQuery query);

    List<VehicleInfoListVo> findAuthCarNum(List<Long> idList);

    List<BaseInfo> getBaseInfoByMobile(@Param("mobile") String mobile);

    List<OrderVehicleDTO> getAllOrderVehicle(@Param("query") OrderVehicleQuery query);

    List<VehicleInfoPO> getUnBindVehicles(@Param("query")UserIdQuery query);
}
